/**
 * Created by johnforrest on 2017/10/19.
 */
$(document).ready(function () {
    // $("#bindEvent").click(function () {
    //     alert("hello");
    //
    // })
    $("#bindEvent").bind("click",clickHandler1);
    $("#bindEvent").bind("click",clickHandler2);
    $("#bindEvent").unbind("click",clickHandler1);

    //jQuery1.7之后推荐用on 和off
    $("#bindEvent").on("click",clickHandler1);
    $("#bindEvent").on("click",clickHandler2);
    $("#bindEvent").off("click",clickHandler1);


})

function  clickHandler1(e) {
    console.log("handler1")

}
function  clickHandler2(e) {
    console.log("johnforrest")

}